﻿Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Xml.Linq
Imports Controladores

 _

Class altaOperador
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        If Session("privUser") Is Nothing Or Integer.Parse(Session("privUser").ToString()) <> 3 Then
            Response.Redirect("index.aspx")
        End If
    End Sub 'Page_Load


    Protected Sub boton_altaOper_Click(ByVal sender As Object, ByVal e As EventArgs)
        Session("error") = controlador.altaOperador(campoDNI.Text.ToString(), camponombre.Text.ToString(), campoApellido.Text.ToString(), campoPass.Text.ToString())
        If Session("error").ToString() = "" Then
            Response.Redirect("admin.aspx")
        Else
            MsgBox(Session("error"))

            controlador.CreateMessageAlert(Me, Session("error").ToString(), "Mensaje de error")
        End If 'Response.Redirect("error2.aspx");
    End Sub 'boton_altaOper_Click
End Class 'altaOperador 
